package com.mkyong.rest;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Response;

//http://localhost:8080/RESTfulExample/rest/message/hello%20world
@Path("/message")
public class MessageRestService {

	@GET
	@Path("/param={param}&des={des}")
	@Produces("text/plain")
	public Response printMessage(@PathParam("param") String msg, @PathParam("des") String des) {

		String result = "Restful example : " + msg + " " + des;

		return Response.status(200).entity(result).build();
	}

}